package cn.va81.component
{
	import flash.display.Shape;
	import flash.display.Sprite;
	
	public class MaoMao extends Sprite
	{
		private var _x:uint;//x坐标
		private var _y:uint;//y坐标
		private var _pointX:uint;
		private var _pointY:uint;
		private var _color:uint;//颜色
		private var _ratio:uint;//比率
		private var _type:uint;//类型
		private var _lock:Boolean;//是否锁定
		private var _score:uint;//得分
		
		public function MaoMao(x:int,y:int,color:uint,ratio:uint,type:uint=MaoType.COMMON,lock:Boolean=false,score:uint=10)
		{
			this._x = 35+x*60;
			this._y = 35+y*60;
			this._pointX = x;
			this._pointY = y;
			this._color = color;
			this._ratio = ratio;
			this._type = type;
			this._lock = lock;
			this._score = score;
			init();
		}
		
		private function init():void
		{
			var cvs:Shape = new Shape();
			cvs.graphics.beginFill(_color);
			cvs.graphics.drawCircle(_x,_y,_ratio);
			cvs.graphics.endFill();
			addChild(cvs);
		}
		
		public function getX():uint
		{
			return _x;
		}
		
		public function setX(x:uint):void
		{
			this._x = x;
		}
		
		public function getPointX():uint
		{
			return _pointX;
		}
		
		public function setPointX(pointX:uint):void
		{
			this._pointX = pointX;
		}
		
		public function getY():uint
		{
			return _y;
		}
		
		public function setY(y:uint):void
		{
			this._y = y;
		}
		
		public function getPointY():uint
		{
			return _pointY;
		}
		
		public function setPointY(pointY:uint):void
		{
			this._pointY = pointY;
		}
		
		public function getColor():uint
		{
			return _color;
		}
		
		public function getRatio():uint
		{
			return _ratio;
		}
		
		public function getType():uint
		{
			return _type;
		}
		
		public function getLock():Boolean
		{
			return _lock;
		}
		
		public function getScore():uint
		{
			return _score;
		}
	}
}